import {HTTP} from '../util/http.js'
import { HTTPP} from '../util/http-p.js'

class ToDoListModel extends HTTPP{

    getTask(wuid, type){
        return this.request({
                url:'todolist/',
                data:{
                    wuid: wuid,
                    type: type
                },
        })
    }

    addOneTask(wuid,taskContent,date){
        return this.request({
            url:'todolist/',
            data:{
            wuid: wuid,
            taskContent: taskContent,
            date: date
            },
        method: 'POST',
        })
    }

    updateOneTask(wuid, taskId){

        return this.request({
            url:'todolist/',
            data:{
            wuid: wuid,
            taskId: taskId
        },
        method: 'PUT',
        })
    }
}

export {
  ToDoListModel
}